<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%String path = request.getContextPath() ;%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %> 
<%@ taglib uri="/WEB-INF/tld/ui.tld" prefix="ui" %> 
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>流程管理版本</title>
<jsp:include page="../import.jsp" flush="true" />
</head>
<body class="iframeBody">
<div class="Wrapper">
<div id="ligergrid1" class="sq-grid"></div>
<input hidden="true" id='applyId' name="applyId" value="${applyId}"/>
</div>

<script type="text/javascript">
	var grid = null;
	$(function () {
		var applyId = $("#applyId").val();
	    $("#ligergrid1").ligerGrid({
	    	url: '<%=path%>/settlement/flowInitList.do?applyId='+applyId,
	    	method : 'get',
	        columns: [
				{display: '进度编号', name: 'scheduleCd', minWidth: 60, align: 'center', enabledSort: false},
				{display: '完成状态', name: 'scheduleNm', width: 160, align: 'center', enabledSort: false},
				{display: '完成时间', name: 'completeTime', minWidth: 130, align: 'center', enabledSort: false,render:renderDate2}
	        ],
	        usePager: true,
	        pageSize:10,
	        root:'rows',
	        record:'total',
	        hideLoadButton : true,
	        width: '100%',
	        //isScroll: false,
	        height:'100%',
	        heightDiff:-2,
	        rownumbers:false,
	        usePagerOnLessPagesize: false
	        
	        /* onRenderComplete: function () {
	        	iframeResize ();
	        } */
	    });
	    //赋值Grid
	    grid = liger.get("ligergrid1");
	    grid.setHeight(100);
	});
	
	//清除按钮
	function clearBtn(){
		var form = new liger.get("searchBar");
		form.clear();
	}
	
	function iframeResize () {
	    if (parent.mainApp) {
	        parent.mainApp.parentTab.onResize();
	    };
	}

	//格式化时间
	function renderDate2(rowdata, index, value) {
		var dateStr = "";
		if (null != value) {
			var date = new Date(value);
			dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DDHHMMSS);
		}
		return dateStr;
	}
</script>
</body>
</html>